﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JV.MVVM {
    public class CommandBase: ICommand {

        public virtual bool CanExecute( object parameter ) { return true; }
        public virtual void Execute( object parameter ) { }
        public event EventHandler<EventArgs> CanExecuteChanged;

        protected void OnCanExecuteChanged( CommandBase cmd ) {
            var ev = CanExecuteChanged;
            if ( ev != null ) ev( cmd, new EventArgs( ) );
        }

    }

}
